Enable unreachable_pub lint in the scheduler - #1141
Conversation
There was a problem hiding this comment.
Code Review
This pull request enables the unreachable_pub lint for the scheduler crate. It updates the configuration in Cargo.toml and scripts/sync.sh, documents the change in CHANGELOG.md, and refactors numerous public items across the scheduler codebase to use restricted visibility (such as pub(crate) or pub(super)) where appropriate. There are no review comments, and I have no additional feedback to provide.
|
By the way, thanks for the PRs. I'm currently on vacation, but will review them when I'm back (some time end of next week). |
Removes the scheduler from the unreachable_pub exclusion list in scripts/sync.sh, adds the lint to crates/scheduler/Cargo.toml, and restricts crate-internal items to pub(crate). The crate's public API (lib.rs) is unchanged. Continues the incremental work of google#565, following google#1139 (interpreter). Verified on host: cargo check across all feature/target combinations from crates/scheduler/test.sh (host wasm/std, i686 native, and thumbv7em wasm/pulley/native with and without defmt) reports zero unreachable_pub warnings; cargo test --lib, cargo clippy, and cargo fmt --check pass.
5680345 to
7f3a3f3
Compare
|
Hi @ia0, welcome back, and thanks for the review! Same note as on the xtask PR: the sync failure here was only the rustup submodule drift, not this change. I've rebased onto the latest main (past #1144, rustup 1.29.1), so it's resolved. I re-verified every feature and target combination from scheduler/test.sh locally and they all come back with zero unreachable_pub warnings, plus tests, clippy and fmt are clean. The fork PR seems to be waiting on a maintainer to approve the workflow run before CI runs again. Once you trigger it, it should pass. Thanks! |
What
Enables the
rust.unreachable_publint for thewasefire-schedulercrate:schedulerfrom theunreachable_pubexclusion list inscripts/sync.sh.rust.unreachable_pub = "warn"tocrates/scheduler/Cargo.toml(matching the orderingsync.shgenerates).pub(crate)across thecall,event,applet,perf, andprotocolmodules. The crate's public API (lib.rs) is unchanged.Why
Continues the incremental work of #565 ("Fix all lints currently disabled in scripts/sync.sh"), following #1139 which enabled the same lint for the interpreter.
Verification
Ran the full feature/target matrix from
crates/scheduler/test.shon host:cargo check --libfor: hostwasm,std,log;i686-unknown-linux-gnunative,std(,log);thumbv7em-none-eabiwasm/pulley/native, each with and withoutdefmt— all report zerounreachable_pubwarnings.cargo test --lib --features=_test,full-api,wasm,stdpasses.cargo clippyandcargo fmt --checkpass.Note: the full Linux CI suite (
scripts/ci.sh) was not run locally.